import request from '@/utils/request'
import { faceApiUrl }  from "../config"

// 删除公司商务成本归集科目管理
export function deleteByPrimaryKey(data) {
  return request({
    url: `${faceApiUrl}/comBusinessCostCollectionTree/deleteByPrimaryKey?id=${data}`,
    method: 'post',
  })
}
// 获取公司商务成本归集科目管理信息
export function getComBusinessCostCollectionTreeById(data) {
    return request({
      url: `${faceApiUrl}/comBusinessCostCollectionTree/getComBusinessCostCollectionTreeById`,
      method: 'get',
      data
    })
  }
// 添加公司商务成本归集科目管理
export function insertSelective(data) {
    return request({
      url: `${faceApiUrl}/comBusinessCostCollectionTree/insertSelective`,
      method: 'post',
      data
    })
  }
  // 通过type查询公司商务成本归集科目管理
export function queryTreeListByType(data,search) {
  let url = search?`${faceApiUrl}/comBusinessCostCollectionTree/queryTreeListByType/${data}?search=${search}`:`${faceApiUrl}/comBusinessCostCollectionTree/queryTreeListByType/${data}`;
    return request({
      url,
      method: 'get',
    })
  }
// 提交
export function submit(data) {
    return request({
      url: `${faceApiUrl}/comBusinessCostCollectionTree/submit/${data}`,
      method: 'get',
      data
    })
  }